POV-Ray : Newsgroups : povray.unofficial.patches : slope-dependent pattern : Re: slope-dependent pattern Server Time
2 Sep 2024 00:13:56 EDT (-0400)
  Re: slope-dependent pattern  
From: Christoph Hormann
Date: 6 Jan 2001 04:23:26
Message: <3A56E40F.9D11C7A1@gmx.de>
Chris Huff wrote:
> 
> Ah, I see...well, declare the large scale function, and use something
> like:
> #declare P = 0.01;// sampling distance
> #declare Fn = function {...}
> 
> #declare MaxSlopeFn =
> function {
>     max(max(
>         (abs(Fn(x+P, y, z)-Fn(x-P, y, z))),
>          abs(Fn(x, y+P, z)-Fn(x, y-P, z)))),
>          abs(Fn(x, y, z+P)-Fn(x, y, z-P)))
>     )/(2*P)
> }
> 

That's an interesting idea, although it would be somewhat slow when used
with pigment functions (1 call to function -> 6 calls)

Thinking about your mentioning of displace warps, i developed another way
for the 2d case, see p.b.i and p.t.s-f. for the implementation.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.